home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Utilities / vim-5.1 / doc / farsi.txt < prev    next >
Encoding:
Text File  |  1998-04-05  |  7.5 KB  |  204 lines

  1. *farsi.txt*     For Vim version 5.1.  Last modification: 1998 Feb 14
  2.  
  3.  
  4.           VIM REFERENCE MANUAL    by Mortaza Ghassab Shiran
  5.  
  6.  
  7. Right to Left and Farsi Mapping for Vim        *farsi*
  8.  
  9.  
  10. These functions have been made by Mortaza G. Shiran
  11. E-mail: <shiran@scn.de>
  12.  
  13. {Vi does not have any of these commands}
  14.  
  15. In order to use right-to-left and Farsi mapping support, it is necessary to
  16. compile Vim with the |+farsi| feature.
  17.  
  18.  
  19. Introduction
  20. ------------
  21. In right-to-left oriented files the characters appear on the screen from right
  22. to left.  This kind of file is most useful when writing Farsi documents,
  23. composing faxes or writing Farsi memos.
  24.  
  25. The commands, prompts and help files are not in Farsi, therefore the user
  26. interface remains the standard Vi interface.
  27.  
  28.  
  29. Highlights
  30. ----------
  31. o  Editing left-to-right files as in the original Vim, no change.
  32.  
  33. o  Viewing and editing files in right-to-left windows.   File orientation is
  34.    per window, so it is possible to view the same file in right-to-left and
  35.    left-to-right modes, simultaneously.
  36.  
  37. o  Compatibility to the original Vim.   Almost all features work in
  38.    right-to-left mode (see Bugs below).
  39.  
  40. o  Changing keyboard mapping and reverse insert modes using a single
  41.    command.
  42.  
  43. o  Backing from reverse insert mode to the correct place in the file
  44.    (if possible).
  45.  
  46. o  While in Farsi mode, numbers are entered from left to right. Upon entering
  47.    a character (not a number), that character will be inserted just into the
  48.    left of the last number.
  49.  
  50. o  No special terminal with right-to-left capabilities is required.  The
  51.    right-to-left changes are completely hardware independent.  Only
  52.    Farsi font is necessary.
  53.  
  54. o  Farsi keymapping on the command line in reverse insert mode.
  55.  
  56. o  Toggling between from left-to-right and right-to-left via F8 function key.
  57.  
  58. o  Toggling between Farsi 3342 standard encoding and VIM Farsi via F9 function
  59.    key. Since this makes sence only for the text written in right-to-left mode,
  60.    this function is also supported only in right-to-left mode.
  61.  
  62.  
  63. Usage
  64. -----
  65. Prior to starting the vim, the environment in which the vim-persian can run
  66. properly must be set.  Following points describe some environment settings
  67. that may be needed:
  68. Key code mapping, loading graphic card in ASCII screen mode, setting the IO
  69. driver in 8 bit clean mode ... .
  70. For details on environment setting, refer to Farsi-HOWTO-1.txt contained in
  71. the Farsi-HOWTO-package.tar .
  72.  
  73. o  Farsi Keymapping Activation
  74.  
  75.    Entering 'set akm' or 'set fk' command while in editor command line mode,
  76.    activates the Farsi keymapping (akm/fk are the abbreviations for altkeymap/
  77.    fkmap which stand for alternative keymap/farsi keymap). Note that
  78.    'altkeymap' is the default setting and in this mode the Farsi keymapping
  79.    is active. To turn off the Farsi as a default second language, put the
  80.    'set noakm' line in your '.vimrc' file.
  81.  
  82. o  Right-To-Left Farsi Mode
  83.  
  84.    By default vim starts in Left-to-Right mode. Following are ways to change
  85.    the window orientation:
  86.  
  87.    + Start the vim with -F option (e.g. vim -F ... ).
  88.  
  89.    + Use F8 function key to toggle between left-to-right and right-to-left.
  90.  
  91.    + While in Left-to-Right mode, enter 'set rl' in the command line ('rl' is
  92.      the abbreviation for rightleft).
  93.  
  94.    + Put the 'set rl' line in your '.vimrc' file to start the  vim in
  95.      Right-to-Left mode permanently.
  96.  
  97. Encoding
  98. --------
  99.  
  100. The Farsi 3342 standard defines only the codes for the capital letters, which
  101. may be suitable for graphical environments. Since I wanted to be conformed
  102. to the Farsi 3342 standard and had to fulfill the VIM requirements (which runs
  103. in a none graphical as well as graphical environment). So I used the Farsi
  104. 3342 standard and added new codes for joining (small) letters. In addition
  105. a conversion function has built in, which allows converting between VIM Farsi
  106. and Farsi 3342 standard via F9.
  107.  
  108. A set of Farsi extended ASCII fonts are composed for both X environment
  109. and ASCII screen mode (using graphic card). The letter codes will be the
  110. same for different platforms (i.e. UNIX's, MS DOS, ...). In this release the
  111. fonts available are suitable for LINUX, SUN-OS, DOS and maybe some other
  112. platforms that I am not aware of by now.
  113.  
  114. For details on the Farsi fonts and font installation, refer to
  115. Farsi-HOWTO-1.txt contained in the Farsi-HOWTO-package.tar .
  116.  
  117. o  Keyboard
  118.  
  119.    +  CTRL-_ in insert/replace modes toggles between Farsi(akm)/Latin
  120.       mode as follows:
  121.  
  122.    +  CTRL-_ moves the cursor to the end of the typed text in edit mode.
  123.  
  124.    +  CTRL-_ in command mode only toggles keyboard mapping between Farsi(akm)/
  125.       Latin. The Farsi text is then entered in reverse insert mode.
  126.  
  127.    +  F8 - Toggles between left-to-right and right-to-left.
  128.  
  129.    +  F9 - Toggles the encoding between Farsi 3342 standard and VIM Farsi.
  130.  
  131.    +  Following is the keyboard mapping while Farsi(akm) mode set (the
  132.       mapping is based on the Iranian standard 'ISIRI 2901' - hopefully right):
  133.  
  134.         -------------------------------------
  135.     `  1  2  3  4  5  6  7  8  9  0  -  =
  136.     ¢  ±  ²  ³  ´  µ  ¶  ·  ¸  ¹  °  ­  ½
  137.         -------------------------------------
  138.     ~  !  @  #  $  %  ^  &  *  (  )  _  +
  139.     ~  £  §  ®  ¤  ¥  ª  ¬  è  ¨  ©  é  «
  140.         -------------------------------------
  141.     q  w  e  r  t  y  u  i  o  p  [  ]
  142.     Ó  Ò  Æ  Ù  Ø  Õ  Ö  à  Ê  É  Ç  ˆ
  143.         -------------------------------------
  144.     Q  W  E  R  T  Y  U  I  O  P  {  }
  145.     ÷  õ  ô  ó  ò  ñ  ð  ö  [  ]  {  }
  146.         -------------------------------------
  147.     a  s  d  f  g  h  j  k  l  ;  '  \
  148.     Ñ  Ð  á  Ã  Ü  Á  Å  Þ  Ý  Ú  Û  ë
  149.         -------------------------------------
  150.     A  S  D  F  G  H  J  K  L  :  "  |
  151.     ù  û  þ  ú  ø  À  ü  æ  ç  º  »  ê
  152.         -------------------------------------
  153.     <  z  x  c  v  b  n  m  ,  .  /
  154.     ¾  ×  Ô  Î  Í  Ì  Ë  Ä  ß  ¦  ¯
  155.         -------------------------------------
  156.     >  Z  X  C  V  B  N  M  <  >  ?
  157.     ¼  ñ  Ô  Ï  Í  ¡  Ë  Â  ¾  ¼  ¿
  158.         -------------------------------------
  159.  
  160. Note:
  161.     ¡  stands for Farsi PSP (beark without space)
  162.  
  163.     ¢  stands for Farsi PCN (for HAMZE attribute )
  164.  
  165. Restrictions
  166. ------------
  167.  
  168. o  In insert/replace mode and fkmap (Farsi mode) set, CTRL-B is not
  169.    supported.
  170.  
  171. o  If you change the character mapping between Latin/Farsi, the redo buffer
  172.    will be reset (emptied). That is, redo is valid and will function (using '.')
  173.    only within the mode you are in.
  174.  
  175. o  While numbers are entered in Farsi mode, the redo buffer will be reset
  176.    (emptied). That is, you can not redo the last changes (using '.') after
  177.    entering numbers.
  178.  
  179. o  While in left-to-right and Farsi mode set, CTRL-R is not supported.
  180.  
  181. o  While in right-to-left mode, the search on 'Latin' pattern does not work,
  182.    except if you enter the Latin search pattern in reverse.
  183.  
  184. o  On the command line, there is no support for entering the numbers from left
  185.    to right and also for the sake of the flexibility the keymapping logic is
  186.    restricted.
  187.  
  188. o  Under the X window environment, if you want to run the vim-persian in a
  189.    xterm, you need to have an ANSI compatible xterm. This is because the
  190.    letter codes above 128 decimal have certain meanings in the standard xterm.
  191.    This is actually no problem, since under the X environment you can run the
  192.    vim-persian in its own Motif/Athena window with more comfort.
  193.  
  194.  
  195. Bugs
  196. ----
  197. While in insert/replace and Farsi mode set, if you repeatedly change the
  198. cursor position (via cursor movement) and enter new text and then try to undo
  199. the last change, the undo will lag one change behind.  But as you continue to
  200. undo, you will reach the original line of text. You can also use U to undo all
  201. changes made in the current line.
  202.  
  203. For more information about the bugs refer to rightleft.txt.
  204.